<?php
if (defined(ABSPATH)) {
    require_once(ABSPATH . "modules/index-head.inc.php");
} else {
    define("ABSPATH", $_SERVER['DOCUMENT_ROOT'] . "/");
    require_once(ABSPATH . "modules/index-head.inc.php");
}
if (isset($_GET['action']) && 'logout' == $_GET['action']) {
    $pageUrl = "modules/logout.inc.php";
    // Include the content-specific module
    require_once(ABSPATH . $pageUrl);
} elseif (isset($_SESSION["valid"]) && true == $_SESSION["valid"]) {
    do_action("redirect", ZEUS_DASH . "index.php");
} else {
    // Show page modules
    switch ($_GET['action']) {
        case 'register':
            $pageUrl = "modules/register.inc.php";
            break;
        case 'lostpassword':
            $pageUrl = "modules/lostpassword.inc.php";
            break;
        case 'logout':
            $pageUrl = "modules/logout.inc.php";
            break;
        default:
            $pageUrl = "modules/login.inc.php";
            break;
    }
    // Include the content-specific module
    require_once(ABSPATH . $pageUrl);
}

?>